package vista;

import javax.swing.JFrame;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JTable;

import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;

import javax.swing.JPanel;

import java.awt.BorderLayout;
import java.awt.Window.Type;
import java.awt.FlowLayout;
import java.awt.event.ActionListener;

import javax.swing.JCheckBox;

import control.Main;

public class Crear extends JFrame {
	private JTable table;
	public Crear(char[] datos, Main main) {
		setType(Type.UTILITY);
		setTitle("Crear");
		
		JPanel pBot = new JPanel();
		getContentPane().add(pBot, BorderLayout.SOUTH);
		pBot.setLayout(new GridLayout(1, 2, 0, 0));
		
		JButton btnCrear = new JButton("Crear");
		btnCrear.setEnabled(false);
		pBot.add(btnCrear);
		
		JButton btnCancelar = new JButton("Cancelar");
		pBot.add(btnCancelar);
		
		JPanel pMid = new JPanel();
		getContentPane().add(pMid, BorderLayout.CENTER);
		GridBagLayout gbl_pMid = new GridBagLayout();
		gbl_pMid.columnWidths = new int[]{0, 0, 0};
		gbl_pMid.rowHeights = new int[]{0, 0, 0, 0, 0};
		gbl_pMid.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
		gbl_pMid.rowWeights = new double[]{0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
		pMid.setLayout(gbl_pMid);
		
		JLabel lblEstados = new JLabel("Estados");
		GridBagConstraints gbc_lblEstados = new GridBagConstraints();
		gbc_lblEstados.insets = new Insets(0, 0, 5, 5);
		gbc_lblEstados.anchor = GridBagConstraints.EAST;
		gbc_lblEstados.gridx = 0;
		gbc_lblEstados.gridy = 0;
		pMid.add(lblEstados, gbc_lblEstados);
		
		JComboBox cBEstados = new JComboBox();
		GridBagConstraints gbc_cBEstados = new GridBagConstraints();
		gbc_cBEstados.insets = new Insets(0, 0, 5, 0);
		gbc_cBEstados.fill = GridBagConstraints.HORIZONTAL;
		gbc_cBEstados.gridx = 1;
		gbc_cBEstados.gridy = 0;
		pMid.add(cBEstados, gbc_cBEstados);
		
		JLabel lblEstadosDeAceptacin = new JLabel("Estados de aceptaci\u00F3n");
		GridBagConstraints gbc_lblEstadosDeAceptacin = new GridBagConstraints();
		gbc_lblEstadosDeAceptacin.insets = new Insets(0, 0, 5, 5);
		gbc_lblEstadosDeAceptacin.gridx = 0;
		gbc_lblEstadosDeAceptacin.gridy = 1;
		pMid.add(lblEstadosDeAceptacin, gbc_lblEstadosDeAceptacin);
		
		JPanel panel = new JPanel();
		GridBagConstraints gbc_panel = new GridBagConstraints();
		gbc_panel.insets = new Insets(0, 0, 5, 0);
		gbc_panel.fill = GridBagConstraints.BOTH;
		gbc_panel.gridx = 1;
		gbc_panel.gridy = 1;
		pMid.add(panel, gbc_panel);
		panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JCheckBox chckbxTest = new JCheckBox("Test");
		panel.add(chckbxTest);
		
		JCheckBox chckbxTest_1 = new JCheckBox("Test2");
		panel.add(chckbxTest_1);
		
		JLabel lblDependencias = new JLabel("Dependencias");
		GridBagConstraints gbc_lblDependencias = new GridBagConstraints();
		gbc_lblDependencias.insets = new Insets(0, 0, 5, 5);
		gbc_lblDependencias.gridx = 0;
		gbc_lblDependencias.gridy = 2;
		pMid.add(lblDependencias, gbc_lblDependencias);
		
		table = new JTable();
		lblDependencias.setLabelFor(table);
		table.setEnabled(false);
		GridBagConstraints gbc_table = new GridBagConstraints();
		gbc_table.insets = new Insets(0, 0, 5, 0);
		gbc_table.fill = GridBagConstraints.BOTH;
		gbc_table.gridx = 1;
		gbc_table.gridy = 2;
		pMid.add(table, gbc_table);
		
		JButton btnAgregarDependencia = new JButton("Agregar dependencia");
		btnAgregarDependencia.setEnabled(false);
		GridBagConstraints gbc_btnAgregarDependencia = new GridBagConstraints();
		gbc_btnAgregarDependencia.gridx = 1;
		gbc_btnAgregarDependencia.gridy = 3;
		pMid.add(btnAgregarDependencia, gbc_btnAgregarDependencia);
	}

}
